package com.bsoft.gol.hcs.specialist.service;

import com.bsoft.gol.hcs.common.bean.request.DecryptDataReq;
import ctd.controller.exception.ControllerException;
import ctd.util.annotation.RpcService;
import hcn.bean.specialist.vo.ChronicTeamList;
import hcn.bean.specialist.vo.QueryChronicDoctorListResponse;
import org.springframework.web.bind.annotation.RequestBody;
import hcn.bean.specialist.vo.QueryDoctorDepartmentListResponse;
import hcn.bean.specialist.qo.GroupMemberRequest;
import com.bsoft.gol.hcs.specialist.bean.request.OutPatientAddGroupRequest;
import com.bsoft.gol.hcs.specialist.bean.request.SaveGroupRequest;
import com.bsoft.gol.hcs.specialist.bean.response.*;
import com.bsoft.gol.hcs.specialist.entity.FusTeamChronicGroupRecordEntity;

import java.util.List;

/**
 *
 * @author lxy
 * @date 2020/7/18
 */
public interface TeamChronicGroupService {


    /**
     * 添加入组
     * @param request req
     * @return res
     */
    @RpcService
   List<FusTeamChronicGroupRecordEntity> saveTeamMember(SaveGroupRequest request) throws ControllerException;

    /**
     * 出组
     * @param request request
     * @return base
     */
    @RpcService
    void outTeamMember(GroupMemberRequest request) throws ControllerException;

    /**
     * 入组审核
     * @param request re
     * @return baseResponse
     */
    @RpcService
    void auditTeamGroup(GroupMemberRequest request) throws ControllerException;


    /**
     * 入组审核列表
     * @param request re
     * @return baseResponse
     */
    @RpcService
    AuditGroupListResponse auditGroupList(GroupMemberRequest request) throws ControllerException;

    /**
     * 患者管理列表
     * @param request re
     * @return baseResponse
     */
    @RpcService
    AuditGroupListResponse personGroupList(GroupMemberRequest request) throws ControllerException;

    /**
     * 院外患者入组
     * @param request request
     * @return result
     */
    @RpcService
    void outPatientAddGroup(OutPatientAddGroupRequest request) throws ControllerException;


    /**
     * 修改联系电话
     * @param request request
     * @return baseResponse
     */
    @RpcService
    void modifyTelephone(GroupMemberRequest request) throws ControllerException;


    /**
     * 变更病种
     * @param request request
     * @return baseResponse
     */
    @RpcService
    void modifyChronicTeam(GroupMemberRequest request) throws ControllerException;

    /**
     * 患者端我的申请列表
     * @param request request
     * @return baseResponse
     */
    @RpcService
    List<TeamChronicGroupForAppResponse> applyGroupList(GroupMemberRequest request) throws ControllerException;

    /**
     * 患者端申请详情
     * @param request request
     * @return baseResponse
     */
    @RpcService
    TeamChronicGroupForAppResponse applyGroupDetail(GroupMemberRequest request) throws ControllerException;


    /**
     * 查询入组所属团队列表
     * @param request request
     * @return baseResponse
     */
    @RpcService
    List<ChronicTeamList> queryTeamList(GroupMemberRequest request) throws ControllerException;

    /**
     * 患者端提交申请
     * @param request request
     * @return baseResponse
     */
    @RpcService
    void applyGroupSave(GroupMemberRequest request) throws ControllerException;

    /**
     * 审核入组详情
     * @param request request
     * @return baseResponse
     */
    @RpcService
    AuditTeamGroupDetail auditTeamGroupDetail(GroupMemberRequest request) throws ControllerException;

    /**
     * 获取我的患者数量、全科患者数量
     * @param request request
     * @return baseResponse
     */
    @RpcService
    PersonGroupCountResponse personGroupCount(GroupMemberRequest request) throws ControllerException;

    /**
     * 已审核 未审核数量
     * @param request request
     * @return baseResponse
     */
    @RpcService
    AuditGroupCount auditGroupCount(GroupMemberRequest request) throws ControllerException;

    /**
     * 根据personId查询入组记录详情
     * @param request request
     * @return baseResponse
     */
    @RpcService
   List<GroupTeamInfo> personGroupDetail(GroupMemberRequest request) throws ControllerException;

    /**
     * 根据doctorId 查询病种列表
     * @param request request
     * @return baseResponse
     */
    @RpcService
    List<QueryChronicListResponse> queryChronicList(GroupMemberRequest request) throws ControllerException;

    /**
     * 根据病种id，doctorId 查询医生列表
     * @param request request
     * @return baseResponse
     */
    @RpcService
    List<QueryChronicDoctorListResponse> queryChronicDoctorList(GroupMemberRequest request) throws ControllerException;

   /**
    * 根据病种id 获取入组扩展属性
    * @param request
    * @return
    * @throws ControllerException
    */
   @RpcService
   List<DiseaseExtendPropertyResponse> queryChronicExtendPropertyList(GroupMemberRequest request) throws ControllerException;
    /**
     * 根据doctorId 查询科室列表
     * @param request request
     * @return baseResponse
     */
    @RpcService
    List<QueryDoctorDepartmentListResponse> queryDoctorDepartmentList(GroupMemberRequest request) throws ControllerException;

  /**
   * @description: 通过证件号获取用户慢病宣教列表
   */
  @RpcService
  List<DiseasesAndFusListResponse> queryDiseasesAndFusList(QueryDiseasesAndFusListResp queryDiseasesAndFusListResp) throws ControllerException;

 /**
  * 根据用户id获取对应已入组的慢病id列表
  */
 @RpcService
 List<Long> queryDiseaseIdByPersonId(String personId);

 /**
  * 获取病种信息列表根据当前登录医生和患者id
  * @param request
  * @return
  */
 @RpcService
 List<TeamChronicGroupResponse> queryChronicGroupList(GroupMemberRequest request) throws ControllerException;


 /**
  * 医生站入组url  加密参数解密
  * @param request
  * @return
  */
 @RpcService
 String decryptData(@RequestBody DecryptDataReq request) throws ControllerException;
 /**
  *医生站入组url  加密参数加密(测试用)
  * @param request
  * @return
  */
 @RpcService
 String encryptData(@RequestBody DecryptDataReq request) throws ControllerException;

 /**
  * 查询当前患者是否有待确认的入组信息
  * @param request
  * @return
  */
 @RpcService
 AuditGroupCount getToConfirmedGroupCount(GroupMemberRequest request) throws ControllerException;

 @RpcService
 List<FusTeamChronicGroupRecordEntity> queryToConfirmedGroup(GroupMemberRequest request) throws ControllerException;

 @RpcService
 void saveConfirmedGroup(FusTeamChronicGroupRecordEntity request) throws ControllerException;
}
